package com.hardydou.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Controller
 *
 * @author hardy
 */
@RefreshScope
@RestController
public class Controller {

    @Value("${db.name}")
    private String name;

    @RequestMapping(path = "/")
    public String index() {
        return this.name;
    }
}
